package com.rupertjones.globalcron.resources;

import org.brownflat.dbinit.upgrade.Upgrade;
import org.springframework.stereotype.Component;

/**
 * <p>&copy Rupert Jones 2011,2012</p>
 *
 * @author rup
 */
@Component
public class Upgrade0023AuditLog implements Upgrade {
    @Override
    public int getSequence() {
        return 23;
    }

    @Override
    public String getSql() {
        return  "CREATE TABLE `audit_log` (\n" +
                "  `id` int(11) NOT NULL AUTO_INCREMENT,\n" +
                "  `user` varchar(100) NOT NULL,\n" +
                "  `audit_type` varchar(100) NOT NULL,\n" +
                "  `created_at` timestamp NOT NULL,\n" +
                "  `message` mediumtext NOT NULL," +
                "   PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;";
    }

    @Override
    public String getName() {
        return "Create audit log";
    }
}
